package cn.unknowpupil.init.generator;

import com.baomidou.mybatisplus.generator.AutoGenerator;

/**
 * @Description: 描述。</br>
 * <p>
 *
 * </p>
 * @author: <a> w10g </a>
 * @data: 2020/8/27 10:01
 * @since: 0.0.2
 */
public class GeneratorApplication {

    public static void main(String[] args) {
        // 代码生成器
        AutoGenerator autoGenerator = new AutoGenerator();
        // 初始化数据库
        autoGenerator.setGlobalConfig(MybatisPlusGenerator.globalConfigure());
        // 初始化数据库
        autoGenerator.setDataSource(MybatisPlusGenerator.dataSourceConfigure());
        // 初始化包信息
        autoGenerator.setPackageInfo(MybatisPlusGenerator.packageConfigure());
        //模板配置
        autoGenerator.setTemplate(MybatisPlusGenerator.templateConfigure());
        //自定义配置
        autoGenerator.setCfg(MybatisPlusGenerator.injectionConfigure());
        //策略配置
        autoGenerator.setStrategy(MybatisPlusGenerator.strategyConfigure());
        //执行
        autoGenerator.execute();
    }
}
